// JavaScript Document
function initslider(id,value,maxvalue)
	{
		
		htmlstr="<fieldset data-role='controlgroup'><input type='range' name='slider' id='slider"+id+"' value='"+value+"' min='0' max='"+maxvalue+"' data-highlight='true' data-track-theme='d' style=' display:none;'></fieldset>";
		$("#drag"+id).append(htmlstr).trigger("create");
		$("#showmax"+id).text(parseInt(maxvalue)+"MB");

		var appml=$("div[role=application]").offset().left;
		var appwd=$("div[role=application]").width();
		$("#showdata"+id+id).css("margin-left",(appml-10)+"px");
		$("#showdata"+id+id).width(appwd+"px");
		$("fieldset[data-role='controlgroup'] div a span").css({
			"height":64+"px",
			"width":55+"px"
			});
		$("fieldset[data-role='controlgroup'] div a").css({
			"height":64+"px",
			"width":55+"px",
			"margin-top":-33+"px"
			});
			
		if(value){
			$("#slider"+id).val(value);
		}
		if(maxvalue){
			$("#slider"+id).attr("max",maxvalue);
		}
		
		var sliderleft=$("div[role=application]").offset().left;
		var divwidth=$("#showdata"+id).width()/2;
		$("#showdata"+id).css("margin-left",sliderleft+$("div[role=application]").width()/2-divwidth+"px");
		var slidermax=$("#slider"+id).attr("max");
		setInterval(function(){
			var curvalue=$("#slider"+id).attr("value");
			var per=curvalue/slidermax;
			if(id=="1")
			{
				$("#showdata"+id).html(curvalue+"MB"); 
			}
			else
			{
				$("#showdata"+id).html(curvalue+"MB(<span id='packageOver'>"+parseInt(per*100)+"</span>%)"); 
			}
			},10);
		$
	}